import Vue from 'vue'
import VueRouter from 'vue-router'
import 'vant/lib/index.css'
Vue.use(VueRouter)

const routes = [{
    path: '/',
    name: 'main',
    component: () => import('../views/Main.vue'),
    children: [{
      path: 'index',
      alias: '',
      name: 'Index',
      component: () => import('../views/Index.vue'),
      children: [{
        path: 'index_hot',
        alias: '',
        name: 'index_hot',
        component: () => import('../views/index_hot.vue'),
      }, {
        path: 'index_yingyuan',
        name: 'index_yingyuan',
        component: () => import('../views/index_yingyuan.vue'),
      }, {
        path: 'index_daiying',
        name: 'index_daiying',
        component: () => import('../views/index_daiying.vue'),
      }, {
        path: 'index_jingdian',
        name: 'index_jingdian',
        component: () => import('../views/index_jingdian.vue'),
      }]
    }, {
      path: 'movie',
      name: 'Movie',
      component: () => import('../views/Movie.vue')
    }, {
      path: 'my',
      name: 'My',
      component: () => import('../views/My.vue')
    }, {
      path: 'short',
      name: 'Short',
      component: () => import('../views/short.vue')
    }]
  },
  {
    path: '/detail/:MovieId',
    name: 'Detail',
    component: () => import('../views/detail.vue')
  },
  {
    path: '/mtrade/:MovieId',
    name: 'Mtrade',
    component: () => import('../views/mtrade.vue')
  },
  {
    path: '/Login/',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/Cinemas/:cinemaId',
    name: 'Cinemas',
    component: () => import('../views/Cinemas.vue')
  },
  {
    path: '/selectseat/:MovieName/:price',
    name: 'SelectSeat',
    component: () => import('../views/SelectSeat.vue')
  },
  {
    path: '/city/',
    name: 'City',
    component: () => import('../views/City.vue')
  }, {
    path: '/movievideo/:VideoID',
    name: 'MovieVideo',
    component: () => import('../views/MovieVideo.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router